﻿    using System;
    using System.Linq;
    using System.Collections.Generic;
    using System.Windows.Data;
    using Pivotbrowser.Web;
using System.Windows;
using System.Windows.Media;

    /// <summary>
    /// Two way <see cref="IValueConverter"/> that lets you bind the inverse of a boolean property to a dependency property.
    /// </summary>
    /// 
namespace Pivotbrowser.Helpers
{
    public class StudFachConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value as string == "Master Winfo")
                return "M";
            else if (value as string == "Bachelor Winfo")
                return "B";
            else
                return (value as string).Substring(0, 1);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value;
        }
    }
}
